package com.yugu.util;

import java.security.SecureRandom;
import java.util.Random;

public class WxUtil {
	 private static final String SYMBOLS = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
	 private static final Random RANDOM = new SecureRandom();
	 //统一下单 
	 // 随机字符串  nonce_str
	 public static String generateNonceStr() {
		 char[] nonceChars = new char[32];
		 for (int index = 0; index < nonceChars.length; ++index) {
			 nonceChars[index] = SYMBOLS.charAt(RANDOM.nextInt(SYMBOLS.length()));
		 }
		 return new String(nonceChars);
	 }

}
